-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for fish #126
base: master
Are you sure you want to change the base?
Support for fish #126
Conversation
…n use this script. Furthermore, begun adding fish support.
@@ -86,13 +86,30 @@ fresh_after_build() { | |||
} | |||
|
|||
_fresh_preamble() { | |||
|
|||
local no_path_export fresh_path user_shell="$(getent passwd $LOGNAME | cut -d: -f7)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getent
is not available on Mac OS X. Would it be possible to detect fish
via the presence of an environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would using the $SHELL variable be more portable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$SHELL
should be fine.
Ideally, a single preamble would be emitted which runs on both bash/zsh and fish. From a few minutes of research, I don’t see a way to do this though. |
How would you like to proceed? There is no way for a unified preamble as far as I can tell. |
I would prefer to just have a way to disable the preamble completely. Perhaps expand |
Ok, I will try that. _fresh_preamble gets called twice during fresh_install. Once because of _run_dsl install and once called directly. Is this intentional? |
This is intentional. The call in |
Changed the function
_fresh_preamble
as discussed in #125 . Same logic as before, but in fish syntax.Currently the function works exclusively for either bash/zsh or fish, depending on the users default shell.
If the user changes his/her default shell, the function would need to be re-run. Is this a problem? I am not sure at what times the function is called exactly.